package com.zy.design.dd.abs;

import com.zy.design.dd.entity.ActionEnum;
import com.zy.design.dd.entity.CountData;
import com.zy.design.dd.entity.DataLine;

/**
 * @author zhaoyi
 * @date 2021/3/19 14:13
 * 节课时长计算
 */
public class MeetCounterHandler implements CountHandler{

    @Override
    public void count(DataLine dataLine, CountData countData) {
        if (dataLine.getAction().equals(ActionEnum.MEET)){
            System.out.println("节课");
            countData.setMeetTime(dataLine.getEndTime() - dataLine.getStartTime());
        }
    }
}
